#ifndef __HARDWARE_H
#define __HARDWARE_H

#include "stm32g4xx_hal.h"

struct Key_Typedef{
	uint16_t age;
	uint8_t short_flag;	//duanan
	uint8_t long_flag;	//changan
	uint8_t press;
	
	uint8_t double_age;
	uint8_t double_ageEN;
	uint8_t double_flag;
};
extern struct Key_Typedef key[5];


struct frq_typedef
{
	uint32_t ccr1a;
	uint32_t ccr1b;
	uint32_t Value1;
	float Duty1;

	uint32_t ccr2a;
	uint32_t ccr2b;
	uint32_t Value2;
	float Duty2;
	
};
extern struct frq_typedef frq;

void LED_Disp(uint8_t state);
uint8_t Key_read(void);
void Key_Serv(void);
void Key_Long_Serv(void);

#endif
